<style type="text/css">
.no-indent{text-indent:0px;}
.indent {text-indent:25px;}
.indent2 {text-indent:50px;}
.indent3 {text-indent:75px;}
.indent4 {text-indent:100px;}
</style>
<div class="bookMeta">
<h4>{% if book.url %}<a href="/redirect/{{ book.url|urlencode}}/">{% endif %}
	{% if book.icon_url %}<img src="{{ book.icon_url|safe }}" width="65px" align="left" style="padding:0 10px 10px 0"/>{% endif %}
	{{ book.title|title|safe }}{% if book.edition %}, {{ book.edition|safe }}ed{% endif %}{% if book.url %}</a>{% endif %}.<br/>
	<span style="font-size:80%;">
		Author(s):
		{% if book.authors %}
			{% for author in book.authors.all %}
				{{ author|title|safe }}{% if not forloop.last %}, {% else %}. {% endif %}{% endfor %}
			<br/>
		{% endif %}
		{% if book.ISBN %}
			ISBN: {{book.ISBN|safe}}.
		<br/>
		{% endif %}
		{% if book.year %}
			Year: {{book.year|safe}}.
		<br/>
		{% endif %}
		{% if book.publisher %}
			Publisher:
			{% if book.publisher.website %}<a href="/redirect/{{ book.publisher.website|safe }}/">{% endif %}
			{{ book.publisher|title|safe }}{% if book.publisher.website %}</a>{% endif %}.
		{% endif %}
	</span></h4>
	<div style="clear:both;"></div>
</div>
<div class="bookTOC">	
	{% for pos,topic_alias_list,page in book_data %}
	<div><!-- float container -->
		{% if  pos|length_is:"1"  %}<div class = "no-indent">{% endif %}
		{% if  pos|length_is:"2"  %}<div class="indent";style="width:100%">{% endif %}
		{% if  pos|length_is:"3"  %}<div class="indent2";style="width:100%">{% endif %}
		{% if  pos|length_is:"4"  %}<div class="indent3">{% endif %}
		{% if  pos|length_is:"5"  %}<div class="indent4">{% endif %}
		<span style="float:left;">
		{{ pos|join:"."|safe }}
		{% for topic,alias in topic_alias_list %}
			{% if alias %}<a href="/topics/{{ alias.name|title|urlencode }}/">{% endif %}{% if not forloop.first %}[{% endif %}{{ topic.name|title|safe }}{% if not forloop.first %}]{% endif %}{% if alias %}</a>{% endif %}{% if not forloop.last %}, {% endif %}
		{% endfor %}
		</span>
		<span style="text-align:right;float:right">{% if page %}{{ page|safe }}{% endif %}</span>
		<br/></div>
		<div style="clear:both;"></div>
	</div>
	{% endfor %}
</div>